package com.yjd.pub.funds.dao;

import com.yjd.comm.base.dao.IBaseDao;
import com.yjd.comm.funds.dto.FirstPayDto;
import com.yjd.comm.funds.dto.RechAddPriceDto;
import com.yjd.comm.funds.dto.RepaymentPayDto;

import java.util.List;
import java.util.Map;

/**
 * <b>description</b>：用户资金表数据访问接口<br>
 * <b>time</b>：2017-09-19 15:07:07 <br>
 * <b>author</b>：  carl
 */
public interface IFundsDao extends IBaseDao{

    /**
     * 充值资金增加
     * @param dto
     * @return
     * @throws Exception
     */
    public int rechAddPrice(RechAddPriceDto dto)throws Exception;


    /**
     * 首付扣款
     * @param dto
     * @return
     * @throws Exception
     */
    public int firstPayReducePrice(FirstPayDto dto)throws Exception;

    /**
     * 还款 扣款
     * @param dto
     * @return
     * @throws Exception
     */
    public int repaymentPayReducePrice(RepaymentPayDto dto)throws Exception;

    /**
     * 增加账户余额
     * @param paramMap
     * @return
     * @throws Exception
     */
    public int increasePrice(Map paramMap)throws Exception;

    /**
     * 获取用户资金信息
     *
     * @param paramMap 查询参数列表
     * @param write 是否是操作主库
     * @return 返回结果列表
     * @throws Exception
     */
    @SuppressWarnings("rawtypes")
    public List queryUserFunds(Map<String, Object> paramMap, boolean write) throws Exception;

    /**
     * 商户确认退单更新资金情况
     *
     * @param paramMap
     * @return
     * @throws Exception
     */
    public int addPriceOfOrderRturn(Map<String, Object> paramMap) throws Exception;
}